﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Root.master" AutoEventWireup="true" CodeFile="revise.aspx.cs" Inherits="Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
       <div class="pageLabel">
        <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="Акт сверки" Font-Size="Medium" Theme="iOS">
        </dx:ASPxLabel>
    </div>
    <div style="margin-left: 10px; margin-bottom: auto;">
            <table style="margin-left: -3px">
                <tr>
                    <td>
                        <dx:ASPxDateEdit ID="dt1" runat="server" Width="80px"></dx:ASPxDateEdit> 
                    </td>
                    <td>
                        <dx:ASPxDateEdit ID="dt2" runat="server" Width="80px"></dx:ASPxDateEdit>
                    </td>
                </tr>
            </table>
            <table style="margin-left: -3px">
                <tr>
                    <td>
                      <dx:ASPxComboBox ID="cbbKontr" runat="server" ValueType="System.Int32" Width="164px" DataSourceID="ds_kontr" TextField="NAME" ValueField="CODE"></dx:ASPxComboBox>  
                    </td>
                </tr>
                <tr>
                    <td>
                      <dx:ASPxButton ID="btn_Exec" runat="server" Text="Обновить" Theme="DevEx" Width="164px"></dx:ASPxButton>   
                    </td>
                </tr>
            </table>
                   
        <dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False" DataSourceID="ds_vzoborot" Theme="DevEx">
            <Columns>
                <dx:GridViewDataTextColumn Caption="Дата" FieldName="DATA" VisibleIndex="0">
                    <PropertiesTextEdit DisplayFormatString="dd.MM.yyyy">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="SCHET" VisibleIndex="1" Caption="Счет" Width="60px">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="PSUMMA" VisibleIndex="3" Caption="Начисления">
                    <PropertiesTextEdit DisplayFormatString="F">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="RSUMMA" VisibleIndex="4" Caption="Оплаты">
                    <PropertiesTextEdit DisplayFormatString="F">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="CURRSUMMA" VisibleIndex="5" Caption="Тек. остаток">
                    <PropertiesTextEdit DisplayFormatString="F">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="NOTE" VisibleIndex="2" Caption="Коментарий" Width="250px">
                </dx:GridViewDataTextColumn>
            </Columns>
            <SettingsBehavior AllowSort="False" />
        </dx:ASPxGridView>
    </div>
    <asp:SqlDataSource ID="ds_vzoborot" runat="server" ConnectionString="<%$ ConnectionStrings:RegRar %>" ProviderName="<%$ ConnectionStrings:RegRar.ProviderName %>" SelectCommand="MAKEKONTRAGENTOBOROT" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="dt1" DbType="Date" Name="D1" PropertyName="Value"/>
            <asp:ControlParameter ControlID="dt2" DbType="Date" Name="D2" PropertyName="Value"/>
            <asp:ControlParameter ControlID="cbbKontr" DbType="Int32" Name="KONTRAGENT" PropertyName="Value"/>
        </SelectParameters>
    </asp:SqlDataSource>
       <asp:EntityDataSource ID="ds_kontr" runat="server" ConnectionString="name=RegistRar" DefaultContainerName="RegistRar" EnableFlattening="False" EntitySetName="KONTRAGENT" Select="it.[CODE], it.[NAME]">
       </asp:EntityDataSource>
</asp:Content>

